﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using RayD.Core;

namespace RayD.Repository.Entites.SystemModule
{
    [Table("BASE_MODULEBUTTON")]
    public class ModuleButtonEntity
    {
        #region 实体成员
        /// <summary>
        /// 模块按钮主键
        /// </summary>
        /// <returns></returns>
        [Key]
        [Column("B_MODULEBUTTONID")]
        public string B_ModuleButtonId { get; set; }
        /// <summary>
        /// 模块主键
        /// </summary>
        /// <returns></returns>
        [Column("B_MODULEID")]
        public string B_ModuleId { get; set; }
        /// <summary>
        /// 按钮编码
        /// </summary>
        /// <returns></returns>
        [Column("B_ENCODE")]
        public string B_EnCode { get; set; }
        /// <summary>
        /// 按钮名称
        /// </summary>
        /// <returns></returns>
        [Column("B_FULLNAME")]
        public string B_FullName { get; set; }
        /// <summary>
        /// 排序码
        /// </summary>
        /// <returns></returns>
        [Column("B_SORTCODE")]
        public int? B_SortCode { get; set; }
        #endregion

        #region 扩展操作
        /// <summary>
        /// 新增调用
        /// </summary>
        public void Create()
        {
            this.B_ModuleButtonId = Guid.NewGuid().ToString();
        }
        /// <summary>
        /// 编辑调用
        /// </summary>
        public void Modify()
        {
        }
        #endregion

        #region 扩展属性
        /// <summary>
        /// 可编辑序号
        /// </summary>
        [NotMapped]
        public string _XID { get; set; }
        #endregion
    }
}
